package com.fansl.allround.study.designpattern.decorator;

/**
 * @author fansl
 * @Description: 装饰者的第一层
 * @date 2019/10/11 10:51
 */
public class Lettuce extends Condiment {
    Humburger humburger;
    public Lettuce(Humburger humburger){
        this.humburger = humburger;
    }
    @Override
    public String getName() {
        return humburger.getName()+" 加生菜";
    }

    @Override
    public double getPrice() {
        return humburger.getPrice()+1.5;
    }
}
